package com.irdstudio.apicenter.console.service.appframe;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.irdstudio.apicenter.console.dm.AppChannelForward;
import com.irdstudio.apicenter.console.dm.AppChannelForwardDao;

@Service(value = "appChannelForwardService")
public class AppChannelForwardService {
	@Autowired
	private AppChannelForwardDao appChannelForwardDao;

	public List<AppChannelForward> queryByAppId(String appid)
			throws SQLException {
		return appChannelForwardDao.queryByAppId(appid);
	}

	public AppChannelForward queryWithKeys(String forwardChannelId)
			throws SQLException {
		return appChannelForwardDao.queryWithKeys(forwardChannelId);
	}

	public int insert(AppChannelForward appChannelForward) throws SQLException,
			ClassNotFoundException {
		return appChannelForwardDao.insert(appChannelForward);
	}

	public int delete(String FORWARD_CHANNEL_ID) throws ClassNotFoundException,
			SQLException {
		return appChannelForwardDao.delete(FORWARD_CHANNEL_ID);
	}

	public int update(AppChannelForward appChannelForward) throws SQLException,
			ClassNotFoundException {
		return appChannelForwardDao.update(appChannelForward);
	}

}
